Fix underflow when trading - #1969
Conversation
|
@Flamefire @Flow86 Could it be that some permissions are missing for pullrequests from a fork? Because the ci above is not starting because of
|
a9c088c to
2b296a3
Compare
Flamefire
left a comment
There was a problem hiding this comment.
Steps to reproduce:
Build two storehousesBoth storehouses have figures with one type, for example woodcutterBoth storehouses have 2 woodcuttersSend 1 woodcutter to ally storehouseThen 3 woodcutters are sent to the ally instead of 1
I don't see how 2 WHs are required for this bug. It seems the issue is that all woodcutters are sent instead of only the requested one. Can you explain?
@Flamefire @Flow86 Could it be that some permissions are missing for pullrequests from a fork? Because the ci above is not starting because of
2 workflows awaiting approval
That's intentional: Especially with AI PRs this avoids people flooding CI. Not sure if (still) required here though
If you have only one warehouse we get a overflow but this has now effect because the warehouse loop is left after the one woodcutter is sent from this warehouse. Only if there are more then one warehouse with the specific job the overflow has an effect. Because the count variable has an infite value and the count==0 check does never match. Ah ok this is because of the AI. Must the approval be done after each commit or only for a newly created pull request? If this must be approved every time it could be difficult to fix unit-test and clang-tidy. |
Ok so the issue is that it sends the requested number from the first WH and then basically ALL from the other warehouses due to
It's done for all PRs just because they could be AI. |
ddc7684 to
b484911
Compare
Co-authored-by: Alexander Grund <Flamefire@users.noreply.github.com>
Co-authored-by: Alexander Grund <Flamefire@users.noreply.github.com>
b484911 to
fac0308
Compare
Steps to reproduce:
It sends the requested number from the first WH and then basically ALL from the other warehouses due to count - available underflowing